import {seckList} from '../../../request/api'

const state = {
    seckillList:[]
}

const getters = {
    getSeckillList(state){
        return state.seckillList
    }
}

const mutations = {
    REQ_LIST(state,payload){
        state.seckillList = payload
    }
} 

const actions = {
    SeckillListAction({commit}){
        seckList()
        .then(res=>{
            console.log(res,'秒杀列表');
            commit('REQ_LIST',res.list)
        })
    }
}

export default {
    state,
    getters,
    mutations,
    actions,
    namespaced:true
}